import { BaseIdInput } from '../../models/base-id-input';
import { CodeGenDataSimple,CodeGenData } from '../../models/codeGen/CodeGenData';
import { DbConfig } from '../../models/codeGen/DbConfig';
import { DbTableInfo } from '../../models/codeGen/DbTableInfo';
import { BaseApi } from '/@/api-services/apis/baseApi';

/**
 * 认证服务
 */
 class CodeGenApi extends BaseApi<CodeGenDataSimple> { 
    getDbConfig= ()=>{
        return this.normalGet<DbConfig>(`/dbConfigSelector`,null)
    }
    //数据表选择器
    tableSelector = (data:any)=>{
        return this.normalGet<DbTableInfo>(`/tableSelector`,data)
    }
    //获取数据表字段信息
    getTableFields = (data:any)=>{
        return this.normalGet<object>(`/getTableFields`,data)
    }
    //获取详细配置信息（数据表，表单，流程等）
    getDetailData=async(data:BaseIdInput)=>{
        return this.normalGet<CodeGenData>(`/GetDetailData`,data)
    }
    getBaseInfoPage=async(data:any)=>{
        return this.page(data)
    }
  }

 export default new CodeGenApi('/codeGen/base');
